#ifndef __FORWARD_SESSION_UDP_H_INCLUDED__
#define __FORWARD_SESSION_UDP_H_INCLUDED__

#include "forward_session.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
 * 转发会话结构
 */
class forward_session_udp : public forward_session {

public:

	forward_session_udp(forward_pair& fwd_pair);

    virtual ~forward_session_udp();

	virtual int packet_forward(FORWARD_DIRECTION direction);

	virtual int pend_forward(FORWARD_DIRECTION direction);

	virtual void close();

	virtual void reset();

	virtual const char* to_string();

	inline int get_fd_out(){
		return fd_out;
	}

	inline void set_fd_out(int fd_out){
		this->fd_out = fd_out;
	}

private:

	// 转发出口socket
	int fd_out;
};

#ifdef __cplusplus
}
#endif

#endif // __FORWARD_SESSION_UDP_H_INCLUDED__
